'''
TwistedSim script for PING-PONG tutorial
@author: Hatem Oraby
'''
import twistedSim.simManager as simManager 
from twistedSim.moduleHandler import twistedH
from twistedSim.contextHandlers import ProcessHandler
from twistedSim import simConfig

def main():
    peerMachine = simManager.Machine()    
    peerModule = ProcessHandler('peer.py', twistedH())
    simManager.SimManager.addModule(peerModule, peerMachine)
    
    #simConfig.Network.fixedSendDelay = False
    #simConfig.Network.seedSendDelay(40)
    simManager.SimManager.run()

if __name__ == '__main__':
    main()